package com.topscomm.gpm.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author hdy
 * @date 2021/12/21
 * @description: 组装手机消息的Map
 * @modify:
 */
public class MessageUtil {


    /**
     * @author: hdy
     * @date: 2021-12-21
     * @param: usercode
     * @param: extendfield1
     * @param: content
     * @param: sourceid
     * @param: sourcetype
     * @param: sendtype
     * @description:  插入App消息
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     * @modify:
     */
    public static Map<String, Object> createMessageAppMap(String usercode,String extendfield1,String content,long sourceid,String sourcetype,int sendtype) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("usercode", usercode);
        map.put("extendfield1", extendfield1);
        map.put("content", content);
        map.put("sourceid", sourceid);
        map.put("sourcetype", sourcetype);
        map.put("sendtype", sendtype);
        return map;
    }

    /**
     * @Description:    消息迁移-APP消息创建
     * @Author:         wuyuyang
     * @Return:         java.util.Map<java.lang.String,java.lang.Object>
     * @exception:
     * @Date:           13/10/2023 上午10:31
     * @Version:        1.0
     **/
    public static Map<String, Object> createMessageAppMapV1(String receivercode,String receivername, String extendfield1,String content,long sourceid,String sourcetype,int sendtype) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("receivercode", receivercode);
        map.put("receivername", receivername);
        map.put("extendfield1", extendfield1);
        map.put("content", content);
        map.put("sourceid", sourceid);
        map.put("sourcetype", sourcetype);
        map.put("sendtype", sendtype);
        return map;
    }


    /**
     * @author: hdy
     * @date: 2021-12-21
     * @param: receivercode
     * @param: receivername
     * @param: subject
     * @param: content
     * @param: sourceid
     * @param: sourcetype
     * @description:  插入系统消息
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     * @modify:
     */
    public static Map<String, Object> createMessageSysMap(String receivercode,String receivername,String subject,String content,long sourceid,String sourcetype) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("receivercode", receivercode);
        map.put("receivername", receivername);
        map.put("subject", subject);
        map.put("content", content);
        map.put("sourceid", sourceid);
        map.put("sourcetype", sourcetype);
        return map;
    }


   /**
    * @Description:    消息迁移-系统消息创建
    * @Author:         wuyuyang
    * @Return:         java.util.Map<java.lang.String,java.lang.Object>
    * @exception:
    * @Date:           13/10/2023 上午10:38
    * @Version:        1.0
    **/
    public static Map<String, Object> createMessageSysMapV1(String receivercode,String receivername,String subject,String content,long sourceid,String sourcetype) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("receivercode", receivercode);
        map.put("receivername", receivername);
        map.put("subject", subject);
        map.put("content", content);
        map.put("sourceid", sourceid);
        map.put("sourcetype", sourcetype);
        return map;
    }


}
